from django.db import models


class User(models.Model):
    id = models.AutoField(db_column = 'id', primary_key = True)
    username = models.CharField(db_column = 'username', max_length = 20, verbose_name = '用户名')
    password = models.CharField(db_column = 'password', max_length = 30, verbose_name = '密码')
    email = models.CharField(db_column = 'email', max_length = 20, verbose_name = '邮箱')
    phone = models.CharField(db_column = 'phone', max_length = 11, verbose_name = '电话')
    wechart = models.CharField(db_column = 'wechart', max_length = 30, verbose_name = '微信')
    qq = models.CharField(db_column = 'qq', max_length = 12, verbose_name = 'QQ')

    def __str__(self):
        return f'{self.username}'

    class Meta:
        db_table = 'user'
        verbose_name_plural = '用户'
